package edu.biwu.utils;

import javax.servlet.http.Cookie;

/**
 * @author 王俊彪
 * @version 1.0
 */
public class CookieUtils {
    private CookieUtils(){

    }
    public static Cookie getCookie(Cookie [] cookies,String name){
        if(cookies!=null){
            for (Cookie cookie : cookies) {
                if(name.equals(cookie.getName())){
                    return cookie;
                }
            }
        }
        return null;
    }
}
